-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MINOR: add wait_for_assigned_partitions to console-consumer #8192
Conversation
3a3d718
to
26588bf
Compare
@@ -273,8 +276,25 @@ def _worker(self, idx, node): | |||
with self.lock: | |||
self.read_jmx_output(idx, node) | |||
|
|||
def _wait_until_partitions_assigned(self, node, timeout_sec=60): | |||
if self.jmx_object_names is not None: | |||
raise Exception("'wait_until_partitions_assigned' is not supported while using 'jmx_object_names'/'jmx_attributes'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not ideal but requires more refactoring to be able support multiple JmxTools running at once
just confirmed that this doesn't break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, but since I'm not too familiar, I'd like to get a second pair of eyes on this.
one of @hachikuji, @mattwong949, @gardnervickers
hit one timeout with
|
Ran on branch builder (the 2.4 branch PR) with 5 repeats, all tests passed re-running the trunk PR version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ran locally 3 times and it passed all of them
jmx_tool.start_jmx_tool(self.idx(node), node) | ||
jmx_tool.read_jmx_output(self.idx(node), node) | ||
assigned_partitions_jmx_attr = "kafka.consumer:type=consumer-coordinator-metrics,client-id=%s:assigned-partitions" % self.client_id | ||
wait_until(lambda: assigned_partitions_jmx_attr in jmx_tool.maximum_jmx_value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be re-running read_jmx_output
before checking this condition
they're passing for me with
|
Ok to test |
previous branch builder test run failed. Re-running the test now. If the test passes, I'll merge this and cherry-pick back. |
2nd branch builder run passed. |
merged #8192 into trunk Thanks @brianbushree! |
what/why the throttling_test was broken by this PR (#7785) since it depends on the consumer having partitions-assigned before starting the producer this PR provides the ability to wait for partitions to be assigned in the console consumer before considering it started. caveat this does not support starting up the JmxTool inside the console-consumer for custom metrics while using this wait_until_partitions_assigned flag since the code assumes one JmxTool running per node. I think a proper fix for this would be to make JmxTool its own standalone single-node service alternatives we could use the EndToEnd test suite which uses the verifiable producer/consumer under the hood but I found that there were more changes necessary to get this working unfortunately (specifically doesn't seem like this test suite plays nicely with the ProducerPerformanceService) Reviewers: Mathew Wong <[email protected]>, Bill Bejeck <bbejeck.com>
cherry-picked to 2.4 |
) what/why the throttling_test was broken by this PR (apache#7785) since it depends on the consumer having partitions-assigned before starting the producer this PR provides the ability to wait for partitions to be assigned in the console consumer before considering it started. caveat this does not support starting up the JmxTool inside the console-consumer for custom metrics while using this wait_until_partitions_assigned flag since the code assumes one JmxTool running per node. I think a proper fix for this would be to make JmxTool its own standalone single-node service alternatives we could use the EndToEnd test suite which uses the verifiable producer/consumer under the hood but I found that there were more changes necessary to get this working unfortunately (specifically doesn't seem like this test suite plays nicely with the ProducerPerformanceService) Reviewers: Mathew Wong <[email protected]>, Bill Bejeck <bbejeck.com>
what/why
the
throttling_test
was broken by this PR (#7785) since it depends on the consumer having partitions-assigned before starting the producerthis PR provides the ability to wait for partitions to be assigned in the console consumer before considering it started.
caveat
this does not support starting up the JmxTool inside the console-consumer for custom metrics while using this
wait_until_partitions_assigned
flag since the code assumes one JmxTool running per node.I think a proper fix for this would be to make
JmxTool
its own standalone single-node servicealternatives
we could use the
EndToEnd
test suite which uses the verifiable producer/consumer under the hood but I found that there were more changes necessary to get this working unfortunately (specifically doesn't seem like this test suite plays nicely with theProducerPerformanceService
)Committer Checklist (excluded from commit message)